package com.mmc.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * 作者：李嘉浩
 * 时间：2024-10-08-18:50
 * 功能：
 */

@Configuration
public class MyExecutorConfig {

    @Bean
    public ExecutorService executorService(){
        return new ThreadPoolExecutor(10,20,30, TimeUnit.SECONDS,new ArrayBlockingQueue<>(500));
    }
}
